<!DOCTYPE html>
<html>
<head>
    <title>分润列表</title>
    <#include "/header.html">
    <link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/layui/css/layui.css">
    <style>
        th {
            text-align: center;
        }

        .form-control {
            margin-left: 10px;
        }

    </style>

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <form class="form-inline">
                <div class="form-group ">
                    <input   type="text" placeholder="请输入合伙人姓名" v-model="q.name" class="form-control">
                    <input type="text"  class="col-md-1 form-control" id="startDate"
                           placeholder="请选择开始日期" readonly>
                    <input type="text"  class="col-md-1 form-control" id="endDate"
                           placeholder="请选择结束日期" readonly>

                    <input type="button" class="btn btn-default form-control" @click="query"  value="查询"/>
                    <input type="button" class="btn btn-primary form-control" @click="clean" value="刷新"/>
                    <input type="button" class="btn btn-primary form-control" @click="downLoad" value="下载"/>
                </div>
                <div style="float:right;margin-right: 20px">
                    <label>分润总计:</label><label id="allAmount">0.00</label> <label>元</label>&nbsp;&nbsp;
                    <label>个人分润:</label><label  id="selfAmount">0.00</label> <label>元</label>&nbsp;&nbsp;
                    <label>团队分润:</label><label  id="teamAmount">0.00</label> <label>元</label>
                </div>
            </form>

        </div>

        <table id="jqGrid"></table>

        <div id="jqGridPager"></div>
    </div>


    <div id="agentList" style="display: none; width: 100%;overflow: hidden;" >
        <div v-for="a in this.agentList" style="width: 75%;margin: 5px auto ">
            姓名:<label>{{a.name}}</label>&nbsp;&nbsp;
            手机号码:<label>{{a.phone}}</label>
            <a class="btn btn-default" @click="searchOne">查询</a>
            <input type="hidden" :value="a.agentId">
        </div>

    </div>
</div>


<script src="${request.contextPath}/statics/js/modules/finance/benefit.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/layui/layui.js"></script>
<script>

    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //常规用法
        var startDate=laydate.render({
            elem: '#startDate',
            format: 'yyyy-MM-dd',
            done:function (value,date) {
                if(value!=''){
                    date.month=date.month-1;
                    endDate.config.min=date;
                    endDate.value=value;
                    $("#endDate").val(endDate.value);
                }
            }
        });
        var endDate=laydate.render({
            elem: '#endDate',
            format: 'yyyy-MM-dd',
            done:function (value,date) {
                if(value!=''){
                    date.month=date.month-1;
                    startDate.config.max=date;
                }
            }
        });
    });

</script>
</body>
</html>